package com.enjoyor.soa.traffic.util.helper;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;

/**
 * excel相关的通用方法
 *
 * @author zbr
 * @reviser zbr
 * @date 2019/3/31 17:46
 */
public class ExcelHelper {
    public static synchronized Boolean isCellBlank(Cell cell){
        if(cell==null || cell.equals("") || cell.getCellType() == HSSFCell.CELL_TYPE_BLANK){
            return true;
        }
        return false;
    }
    public static synchronized Boolean isRowBlank(Row row){
        if(row == null || row.equals("") || isCellBlank(row.getCell(row.getFirstCellNum()))){
            return true;
        }
        return false;
    }
}
